home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <io.h>
- #define STDIN 0
- #define STDOUT 1
-
- #define BUFFERSIZE 10000
- #define CYR_A (unsigned char)176 /*░*/
- #define CYR_ya (unsigned char)239 /*∩*/
-
- unsigned char buffer[BUFFERSIZE];
- int i,nread;
-
- static unsigned char *upper[65]={
- "{\\mcyr A}", /*░*/
- "{\\mcyr B}", /*▒*/
- "{\\mcyr V}", /*▓*/
- "{\\mcyr G}", /*│*/
- "{\\mcyr D}", /*┤*/
- "{\\mcyr E}", /*╡*/
- "{\\mcyr Zh}", /*╢*/
- "{\\mcyr Z}", /*╖*/
- "{\\mcyr I}", /*╕*/
- "{\\mcyr \\accent\"24I}", /*╣*/
- "{\\mcyr K}", /*║*/
- "{\\mcyr L}", /*╗*/
- "{\\mcyr M}", /*╝*/
- "{\\mcyr N}", /*╜*/
- "{\\mcyr O}", /*╛*/
- "{\\mcyr P}", /*┐*/
- "{\\mcyr R}", /*└*/
- "{\\mcyr S}", /*┴*/
- "{\\mcyr T}", /*┬*/
- "{\\mcyr U}", /*├*/
- "{\\mcyr F}", /*─*/
- "{\\mcyr Kh}", /*┼*/
- "{\\mcyr Ts}", /*╞*/
- "{\\mcyr Ch}", /*╟*/
- "{\\mcyr Sh}", /*╚*/
- "{\\mcyr Shch}", /*╔*/
- "{\\mcyr P2}", /*╩*/
- "{\\mcyr Y}", /*╦*/
- "{\\mcyr P1}", /*╠*/
- "{\\mcyr E1}", /*═*/
- "{\\mcyr Yu}", /*╬*/
- "{\\mcyr Ya}", /*╧*/
- "{\\mcyr a}", /*╨*/
- "{\\mcyr b}", /*╤*/
- "{\\mcyr v}", /*╥*/
- "{\\mcyr g}", /*╙*/
- "{\\mcyr d}", /*╘*/
- "{\\mcyr e}", /*╒*/
- "{\\mcyr zh}", /*╓*/
- "{\\mcyr z}", /*╫*/
- "{\\mcyr i}", /*╪*/
- "{\\mcyr \\accent\"24i}", /*┘*/
- "{\\mcyr k}", /*┌*/
- "{\\mcyr l}", /*█*/
- "{\\mcyr m}", /*▄*/
- "{\\mcyr n}", /*▌*/
- "{\\mcyr o}", /*▐*/
- "{\\mcyr p}", /*▀*/
- "{\\mcyr r}", /*α*/
- "{\\mcyr s}", /*ß*/
- "{\\mcyr t}", /*Γ*/
- "{\\mcyr u}", /*π*/
- "{\\mcyr f}", /*Σ*/
- "{\\mcyr kh}", /*σ*/
- "{\\mcyr ts}", /*µ*/
- "{\\mcyr ch}", /*τ*/
- "{\\mcyr sh}", /*Φ*/
- "{\\mcyr shch}", /*Θ*/
- "{\\mcyr p2}", /*Ω*/
- "{\\mcyr y}", /*δ*/
- "{\\mcyr p1}", /*∞*/
- "{\\mcyr e1}", /*φ*/
- "{\\mcyr yu}", /*ε*/
- "{\\mcyr ya}", /*∩*/
- "{\\mcyr N0}" /*≡*/
- };
-
- unsigned char *c;
-
- void main(void)
- {
- while (nread=read(STDIN,(void *)buffer,BUFFERSIZE))
- {
- for (i=0; i<nread; i++)
- {
- if ((buffer[i]>=CYR_A)&&(buffer[i]<=CYR_ya))
- {
- for (c=upper[buffer[i]-CYR_A]; *c; c++)
- write(STDOUT,c,1);
- }
- else
- write(STDOUT,&buffer[i],1);
- }
- }
- }